@using MvcDemo02.Models
@model IEnumerable<Student>

<link rel="stylesheet" href="~/css/base.css" />
<div>
    <div>
        <tr>
            <th><input type="text" name="keyword" /></th>
            <th><button onclick="btnquery()">查找</button></th>
            <th><button onclick="btnadd()">新增</button></th>
        </tr>
    </div>
    <table>
        <thead>
            <tr>
                <th>@Html.DisplayNameFor(Model =>Model.Id)</th>
                <th>@Html.DisplayNameFor(Model =>Model.Name)</th>
                <th>@Html.DisplayNameFor(Model =>Model.Age)</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody name="tbdata">
            @foreach (var item in Model)
            {
                <tr>
                    <td>@item.Id</td>
                    <td>@item.Name</td>
                    <td>@item.Age</td>
                    <td>
                        <button onclick="btnEdit(@item.Id)">修改</button>
                        <button onclick="btnDel(@item.Id)">删除</button>
                    </td>
                </tr>
            }
        </tbody>

    </table>
</div>
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<script src="~/js/base.js"></script>